<template>
	<view>
		<view  class="notice-container">
			<view class="notice-img">
				<img src="@/static/info/gonggao.png" alt="" style="width: 100%; height: 100%;">
			</view>
			</view>
			<view class="notice-list">
				<view class="notice-title">{{info.title}}</view>
				<view class="notice-time">{{info.publishTime}}</view>
				<view class="notice-content" v-html="info.content"></view>
			</view>
	</view>
</template>

<script>
	import {getNoticeDetail} from '@/utils/api.js'
	export default {
		data() {
			return {
				noticeId:'',
				info:{}
			}
		},
		onLoad(options){
			this.noticeId = options.id
			this.getNoticeDetail()
		},
		methods: {
			async getNoticeDetail(){
				uni.showLoading()
				const res = await getNoticeDetail(this.noticeId)
				if(res.code == 200){
					uni.hideLoading()
				    this.info = res.data
				}
			 	
			},
		}
	}
</script>

<style>

.notice-img{
	width: 100%;
	height: 300rpx;
}
.notice-container{
	position: relative;
}
.notice-list{
	position: absolute;
	top: 180rpx;
	width: 95%;
	left: 50%;
	transform: translateX(-50%);
	height: 300rpx;
	background-color: #ffffff;
	border-radius: 16rpx;
	
}
.notice-title{
	font-weight: bold;
	text-align: center;
	margin-top:40rpx;
}
.notice-time{
	text-align: center;
    font-size: 24rpx;
	color: #b4b4b4;
	margin-top: 30rpx;
}
.notice-content{
	padding: 20rpx;
	margin-top: 20rpx;
}
</style>
